<template>
    <div class="assert_option assert_change">
        <div class="assert_content" style="background-color: white;padding-top: 18px;">
            <Form ref="businessTypeForm" :model="businessTypeForm" :label-width="140">
                <!-- 业务类型 -->
                <!-- <Card> -->
                    <div>
                        <div class="operBtn">  <span   @click="backAssert" class="backBtn">返回</span>
                            <span   class="saveBtn" @click="saveBtn" v-if="diffType!='details'">保存</span>
                            <!-- <span  @click="submitAssert"  class="submitBtn"  v-if="diffType!='details'">提交</span>
                             -->
                             <span  @click="saveBtn('submit')"  class="submitBtn"  v-if="diffType!='details'">提交</span>
                        </div>
                        <h2 class="common_title extra_title">
                            业务类型
                            <!-- <p>  <span   @click="backAssert" class="backBtn">返回</span>
                                <span   class="saveBtn" @click="saveBtn" v-if="diffType!='details'">保存</span>
                                <span  @click="submitAssert"  class="submitBtn"  v-if="diffType!='details'">提交</span>
                            </p> -->
                        </h2>
                        <div class="common_content">
                            <Row>
                                <Col span="8">
                                    <FormItem label="申请编号">
                                        <Input v-model="applyNo" :disabled="true"/>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem label="业务类型">
                                        <RadioGroup v-model="businessTypeForm.businessType">
                                            <Radio label="01" disabled>新车</Radio>
                                            <Radio label="02" disabled>二手车</Radio>
                                        </RadioGroup>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem label="车辆类型" prop="carType">
                                        <Select v-model="businessTypeForm.carType" placeholder="请选择车辆类型" class="w200"
                                                :disabled="isDisabled">
                                            <Option :value="item.value" v-for="(item,index) in carTypeList"
                                                    :key="index">{{item.title}}
                                            </Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem label="车辆属性" prop="carNature">
                                        <Select v-model="businessTypeForm.carNature" placeholder="请选择车辆属性" class="w200"
                                                :disabled="isDisabled">
                                            <Option :value="item.value" v-for="(item,index) in carAttrList"
                                                    :key="index">{{item.title}}
                                            </Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem label="运营方式" prop="operateWay">
                                        <Select v-model="businessTypeForm.operateWay" placeholder="请选择运营方式" class="w200"
                                                :disabled="isDisabled">
                                            <Option :value="item.value" v-for="(item,index) in operWayList"
                                                    :key="index">{{item.title}}
                                            </Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem label="挂靠方式" prop="affiliatedWay">
                                        <Select v-model="businessTypeForm.affiliatedWay" placeholder="请选择挂靠方式"
                                                class="w200" :disabled="isDisabled">
                                            <Option :value="item.value" v-for="(item,index) in affiModeList"
                                                    :key="index">{{item.title}}
                                            </Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem label="购车目的" prop="carPurpose">
                                        <Select v-model="businessTypeForm.carPurpose" placeholder="请选择购目的" class="w200"
                                                :disabled="isDisabled">
                                            <Option :value="item.value" v-for="(item,index) in buyPurposeList"
                                                    :key="index">{{item.title}}
                                            </Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                            </Row>
                        </div>
                    </div>
                <!-- </Card> -->
            </Form>
            <!-- 挂靠信息 -->
            <Form ref="affiliatedForm" :model="affiliatedForm"
                  v-if="tempAffiMode!='00' && tempAffiMode!='' && tempAffiMode!=null" :rules="affiliatedFormValidate"
                  :label-width="140">
                <!-- <Card> -->
                    <affiliated-way
                        :affiliatedForm="affiliatedForm"
                        :tempAffiMode="tempAffiMode"
                        :applyNo="applyNo"
                        :tempaffiliatedId="tempaffiliatedId"
                        :capitalId="capitalId"
                        ref="affiliatedWay"
                        :location="location"
                        @saveAffiliatedId="saveAffiliatedId"
                        :tempAffiInfo="tempAffiInfo"
                        :isShowDetails="isShowDetails"
                        @queryRecordAddress="queryRecordAddress"
                    >
                    </affiliated-way>
                <!-- </Card> -->
            </Form>
            <Form ref="optionForm" :model="optionForm" :rules="optionFormValidate" :label-width="140">
                <!-- <Card> -->
                    <new-car
                        :optionForm="optionForm"
                        v-if="businessType=='01'&&carAttr!='02'"
                        :location="location"
                        :isAssertChange="isAssertChange"
                        @queryVehicleData="queryVehicleData"
                        @saveCapitalInfo="saveCapitalInfo"
                        :dynamicLocation="dynamicLocation"
                        @loadDataAddress="loadAddress"
                        :pageIdentify="pageIdentify"
                        @changeSalePrice="changeSalePrice"
                        :diffType="diffType"
                        ref="newCar"
                    ></new-car>
                    <plate-car :optionForm="optionForm"
                        v-if="businessType=='01'&&carAttr=='02'"
                        @saveCapitalInfo="saveCapitalInfo"
                        :location="location"
                        :dynamicLocation="dynamicLocation"
                        @loadDataAddress="loadAddress"
                        @resetPlateVinInfo="resetPlateVinInfo"
                        :isShowDetails="isShowDetails"
                    >
                    </plate-car>
                    <old-car
                        :optionForm="optionForm"
                        v-if="businessType=='02'"
                        @saveCapitalInfo="saveCapitalInfo"
                        :location="location"
                        :dynamicLocation="dynamicLocation"
                        @loadDataAddress="loadAddress"
                        :isShowDetails="isShowDetails"
                    ></old-car>
                <!-- </Card> -->
            </Form>
            <financial-prod
                :additionalProessForm="additionalProessForm"
                :proessForm="proessForm"
                :carProessForm="carProessForm"
                ref="financialProd"
                @isShowModel="isShowProessModel"
                :saveStatus="saveStatus"
                @scheduleTitle="scheduleTitle"
                @showCalculate="showCalculate"
                :uuid="uuid"
                :intropath="intropath"
                :curTab="curTab"
                :applyNo="applyNo"
                @caluMaxValue="caluMaxValue"
                @passValiate="passValiate"
                :valiateFlag="valiateFlag"
                @turnValiteFlag="turnValiteFlag"
                :salePrice="salePrice"
                :isAutoCount="isAutoCount"
                :pageIdentify="pageIdentify"
                :queryFormEl="queryFormEl"
                :diffType="diffType"
            >
                <template slot="afsApply">
                    <div>
                        <div class="submit">
                            <Button type="primary" @click="calculate" style="width: 100px;height: 30px;">计算</Button>
                            <!-- <Button type="primary" style="margin-left: 30px;width: 100px;height: 30px;"
                                    @click="financialSave" :disabled="saveStatus.disabled">保存
                            </Button> -->
                        </div>
                        <Modal width="50%" v-model="proessModel" :footer-hide="true" @on-cancel="cancelModel">
                            <div class="scheduleTitle">
                                 <span v-for="(item,index) in scheduleTitleList" @click="tagTitle(item.value)"
                                       :class="{curScheStyle:curSchedule===item.value}">
                                     {{item.title}}
                                 </span>
                            </div>
                            <div class="sliderList">
                                <div>
                                    <Form ref="proessForm" :model="proessForm" :rules="proessFormValidate"
                                          :label-width="140" v-show="curSchedule=='00'">
                                        <Row v-for="(item,index) in proessForm.proessList" :key="index"
                                             style="padding: 0px 30px;">
                                            <Col :span="2">
                                                <div style="padding-top: 8px;">
                                                    {{item.no}}<span>期</span>
                                                </div>
                                            </Col>
                                            <Col :span="5">
                                                <FormItem label="" :prop="'proessList['+index+'].inputValue'"
                                                          class="inline-block mb10" :label-width="0">
                                                    <Input v-model="item.inputValue" placeholder=""
                                                           @on-blur="getInputValue(item.inputValue,index,isreadonly)"
                                                           style="width: 100%;"
                                                           :readonly="isreadonly"/>
                                                </FormItem>
                                            </Col>
                                            <Col :span="16" offset="1">
                                                <Slider :value="item.proessValue" range :disabled="true" :max="maxValue"
                                                        :step="stepNumber"></Slider>
                                            </Col>
                                        </Row>
                                    </Form>
                                    <Form ref="carProessForm" :model="carProessForm" :label-width="140"
                                          v-show="curSchedule=='01'">
                                        <Row v-for="(item,index) in carProessForm.proessList" :key="index"
                                             style="padding: 0px 30px;">
                                            <Col :span="2">
                                                <div style="padding-top: 8px;">
                                                    {{item.no}}<span>期</span>
                                                </div>
                                            </Col>
                                            <Col :span="5">
                                                <FormItem label="" class="inline-block mb10" :label-width="0">
                                                    <Input v-model="item.inputValue" placeholder=""
                                                           :readonly="isreadonly"
                                                           style="width: 100%;"
                                                           />
                                                </FormItem>
                                            </Col>
                                            <Col :span="16" offset="1">
                                                <Slider :value="item.proessValue" range :disabled="true" :max="maxValue"
                                                        :step="stepNumber"></Slider>
                                            </Col>
                                        </Row>
                                    </Form>
                                    <Form ref="additionalProessForm" :model="additionalProessForm" :label-width="140"
                                          v-show="curSchedule=='02'">
                                        <Row v-for="(item,index) in additionalProessForm.proessList" :key="index"
                                             style="padding: 0px 30px;">
                                            <Col :span="2">
                                                <div style="padding-top: 8px;">
                                                    {{item.no}}<span>期</span>
                                                </div>
                                            </Col>
                                            <Col :span="5">
                                                <FormItem label="" class="inline-block mb10" :label-width="0">
                                                    <Input v-model="item.inputValue" placeholder=""
                                                           :readonly="isreadonly"
                                                           style="width: 100%;"
                                                           />
                                                </FormItem>
                                            </Col>
                                            <Col :span="16" offset="1">
                                                <Slider :value="item.proessValue" range :disabled="true" :max="maxValue"
                                                        :step="stepNumber"></Slider>
                                            </Col>
                                        </Row>
                                    </Form>
                                </div>
                            </div>
                            <div v-if="isShowCalculate" style="text-align: center;margin:0px;" class="submit">
                                <Button type="primary" @click="calculateIntrate" style="width: 100px;height: 30px;">计算</Button>
                            </div>
                        </Modal>
                    </div>
                </template>
            </financial-prod>
            <!-- <Card> -->
                <div style="background:white;">
                    <h2 class="common_title extra_title">
                        变更证明
                    </h2>
                    <div class="pr uploadecn">
                        <span>上传变更文件</span>
                        <single-upload :imgtype="imgtype" ref="singleUpload" :diffType="diffType"></single-upload>
                    </div>
                </div>
            <!-- </Card> -->
        </div>
        <!--品牌车型弹窗-->
        <div v-if="isShowModel">
            <char-cascade @close-model="closeModel" 
            @carinfo="carinfo"  
            :modelLibType="modelLibType" 
            :businessType="businessType"
            ></char-cascade>
        </div>
    </div>
</template>
<script>
    import "../../../assets/css/base.css";
    import * as utils from '_p/afs-apply/assets/js/utils.js'
    import CharCascade from "@/components/char-cascade"
    import AffiliatedWay
        from "_p/afs-apply/pages/apply-report/personal/business-option/affiliated-way/affiliatedWay.vue"
    import NewCar from "_p/afs-apply/pages/apply-report/personal/business-option/new-car/newCar.vue"
    import PlateCar from "_p/afs-apply/pages/apply-report/personal/business-option/plate-car/plateCar.vue"
    import OldCar from "_p/afs-apply/pages/apply-report/personal/business-option/old-car/oldCar.vue"
    import {getLocation} from "_p/afs-apply/api/apply-report/personal/common.js"
    import {
        getAffiliatedInfo,
        getCarInfo,
        getOrderInfo,
        noDealerGetAddressList,
        updateCarInfo,
        updateBodyContent
    } from '_p/afs-apply/api/apply-report/personal/businessOption.js'
    import {getUserInfo} from '@/projects/basic/api/admin/user'
    import * as contractUtils from "_p/afs-apply/assets/js/utils.js"
    import FinancialProd from "@/components/financial-prod";
    import {sendAssertChangeCaseSubmit} from "../../../api/apply-report/personal/common";
    import SingleUpload from "@/components/single-upload"

    export default {
        name: "counter",
        data() {
            let isSalePriceValiate = (rule, value, callback) => {
                if (value) {
                    if (!utils.isTwoDicmal(value)) {
                        callback(new Error("最多为两位小数"))
                        return;
                    } else {
                        // 新车
                        if (this.businessType == '01') {
                            // if(this.businessType=='01'&&this.carAttr!='02'){
                            // 销售价格小于等于指导价格
                            if (parseFloat(value) > parseFloat(this.optionForm.guidePrice)) {
                                callback(new Error("小于等于指导价"))
                                return;
                            }
                        }
                    }
                }
                callback()
            }
            let isVinNoValiate = (rule, value, callback) => {
                if (value) {
                    if (!utils.isCharNum(value)) {
                        callback(new Error("格式为英文与数字"))
                        return;
                    } else {
                        if (value.length != 17) {
                            callback(new Error("vin号位数为17位"))
                            return;
                        }

                    }
                }
                callback()
            }
            let mileageValiate = (rule, value, callback) => {
                if (value) {
                    if (!utils.isTwoDicmal(value)) {
                        callback(new Error("最多为两位小数"))
                        return;
                    } else {
                        // 二手车
                        if (this.businessType == "02") {
                            if (parseFloat(value) > 200000) {
                                callback(new Error("小于等于200000公里"))
                                return;
                            }
                        }
                        // 挂牌新车
                        if (this.businessType == '01' && this.carAttr == '02') {
                            if (parseFloat(value) > 100) {
                                callback(new Error("小于等于100公里"))
                                return;
                            }
                        }
                    }
                }
                callback()
            }
            let isEvaluatePriceValiate = (rule, value, callback) => {
                if (value) {
                    if (!utils.isTwoDicmal(value)) {
                        callback(new Error("最多为两位小数"))
                        return;
                    } else {
                        // 二手车
                        if (this.businessType == '02') {
                            //  // 评估价格小于新车购车价格
                            if (parseFloat(value) > parseFloat(this.optionForm.guidePrice)) {
                                callback(new Error("应小于新车购车价格"))
                                return;
                            }
                        }
                    }
                }
                callback()
            }
            let isUsedCarSalePriceValiate = (rule, value, callback) => {
                if (value) {
                    if (!utils.isTwoDicmal(value)) {
                        callback(new Error("最多为两位小数"))
                        return;
                    } else {
                        // 二手车
                        if (this.businessType == '02') {
                            // 二手车销售价格小于新车购车价格
                            if (parseFloat(value) > parseFloat(this.optionForm.guidePrice)) {
                                callback(new Error("应小于等于新车购车价格"));
                                return;
                            }
                            // 二手车销售价格小于等于评估价格
                            // if (parseFloat(value) > parseFloat(this.optionForm.evaluatingPrice)) {
                            //     callback(new Error("应小于等于评估价格"))
                            //     return;
                            // }
                        }
                    }
                }
                callback()
            }
            let plateNoValiate = (rule, value, callback) => {
                if (value) {
                    if (!utils.isPlateNo(value)) {
                        callback(new Error("至少5位字母,中文,数字"))
                        return;
                    } else {
                        let firstchar = value.substr(0, 1);
                        let secondechar = value.substr(1, 1);
                        // console.log(/[\u4e00-\u9fa5]/.test(firstchar),"/[\u4e00-\u9fa5]/.test(firstchar)")
                        if (!/[\u4e00-\u9fa5]/.test(firstchar) || !/[A-Za-z]/.test(secondechar)) {
                            callback(new Error("车牌号首位为中文,第二位为英文"))
                            return;
                        }
                    }
                }
                callback()
            }
            let transNumsValiate = (rule, value, callback) => {
                if (value) {
                    // 二手车
                    if (this.businessType == "02") {
                        console.log(value < this.optionForm.yearTransNum, "value<this.optionForm.yearTransNum")
                        if (value < this.optionForm.yearTransNum) {
                            callback(new Error("大于等于一年内过户次数"))
                            return;
                        }
                    }
                }
                callback();
            }
            return {
                diffType:"",
                salePrice:"",
                isAutoCount:true,
                modelLibType:"afsApply",
                isAssertChange: true,
                assertId:"",
                isShowAddress: true,
                imgtype: "assetsChange",
                transNumsValiate: transNumsValiate,
                tempAffiMode: "",
                tempaffiliatedId: "",
                tempAffiInfo: {},
                location: [],
                dynamicLocation: [],
                isDisabled: true,
                isShowModel: false,
                capitalId: "",
                businessType: "01",
                applyNo: "",//申请编号
                orderId: "",
                carAttr: "02",
                curTab: 0,
                // 车辆类型
                carTypeList: [],
                //车辆属性
                carAttrList: [],
                // 运营方式
                operWayList: [],
                //  挂靠方式
                affiModeList: [],
                // 购车目的
                buyPurposeList: [],
                businessTypeForm: {
                    // 业务类型
                    businessType: "01",
                    carType: "",
                    carNature: "",
                    operateWay: "",
                    affiliatedWay: "",
                    carPurpose: "",
                },
                // 挂靠信息表单
                affiliatedForm: {
                    // 挂靠信息
                    // 第三方公司挂靠与个体工商户与网约车公用字段
                    affiliatedId: "",
                    affiliatedName: "",//公司名称

                    socUniCrtCode: "",//统一社会信用代码
                    legalName: "",//法人姓名
                    legalPhone: "",//联系电话
                    licenceEndDate: "",//运输许可证有效期
                    registLocation: [],//注册公司地址
                    registAddress: "",
                    // 网约车挂靠
                    platformId: "",
                    cooperPlatform: "",
                },
                affiliatedFormValidate: {},
                brandId: "",//品牌id
                modelId: "",//车型id
                styleId: "",//款式id
                optionForm: {
                    // 新车与挂牌车与二手车资产信息的公共字段
                    brandName: "",
                    modelName: "",
                    styleName: "",
                    purchaseLocation: [],//购车地点
                    guidePrice: "",//车辆价格
                    licenseLocation: [],//上牌地点

                    //新车与挂牌车资产信息的公共字段
                    salePrice: "",//指导价

                    // 挂牌汽车与二手车资产信息的公共字段
                    carVin: "",
                    engineNo: "",
                    carFunction: "",
                    mileage: "",
                    carBelongs: "",
                    belongsCertNo: "",
                    transNums: 0,

                    // 挂牌车车辆手续信息字段
                    vehicleMadeDate: "",
                    firstLandingDate: "",
                    licensePlate: "",
                    firstLicenseAddress:[],

                    // 二手车资产信息字段
                    carBodyClass: "",
                    carColor: "",
                    fuelType: "",
                    carDisplacement: "",//排量
                    carTransmission: "",//变速器
                    totalPassenger: 0,//核定载客
                    fullModelNum: "",//车辆型号
                    secondSalePrice: "",
                    evaluatingPrice: "",
                    belongsAddress: "",

                    // 二手车车辆手续信息字段
                    carAppraiser: "",//评估师
                    dealerName: "",
                    dealerPhone: "",
                    dealerLocation: [],
                    // dealerDetail:"",
                    yearTransNum: 0,//一年内过户次数
                    isCirTrans: "",
                    isMortgage: "",
                    registLocation: [],//注册地点

                },
                uuid: "",
                username: "",
                stepNumber: 0.01,
                maxValue: 800,
                saveStatus: {
                    disabled: true,
                },
                isShowDetails: true,
                proessModel: false,
                isShowCalculate: false,
                additionalProessForm: {
                    proessList: [],
                },
                proessFormValidate: {},
                proessForm: {
                    proessList: [],
                },
                carProessForm: {
                    proessList: [],
                },
                scheduleTitleList: [],
                curSchedule: "00",
                intropath: "afsApply",
                pageIdentify:"assertChange",
                valiateFlag:false,
                isreadonly: true,
                optionFormValidate: {
                    // 新车资产信息校验
                    brandName: [
                        {required: true, message: "品牌不能为空", trigger: "blur"}
                    ],
                    modelName: [
                        {required: true, message: "车型不能为空", trigger: "blur"}
                    ],
                    styleName: [
                        {required: true, message: "款式不能为空", trigger: "blur"}
                    ],
                    guidePrice: [
                        {required: true, message: "指导价不能为空", trigger: "blur"},
                        {validator: utils.isTwoDicmalValiate, trigger: "blur"}
                    ],
                    salePrice: [
                        {required: true, message: "车辆价格不能为空", trigger: "blur"},
                        {validator: isSalePriceValiate, trigger: "blur"}
                    ],
                    licenseLocation: [
                        {required: true, message: "上牌地点不能为空", trigger: "change", type: "array"}
                    ],
                    purchaseLocation: [
                        {required: true, message: "购车地点不能为空", trigger: "change", type: "array"}
                    ],
                    // 挂牌车资产信息校验
                    carVin: [
                        {required: true, message: "VIN号不能为空", trigger: "blur"},
                        {validator: isVinNoValiate, trigger: "blur"}
                    ],

                    carFunction: [
                        {required: true, message: "使用性质不能为空", trigger: "blur"}
                    ],
                    engineNo: [
                        {required: true, message: "发动机号不能为空", trigger: "blur"},
                        {validator: utils.isMoreCharNumValitate, trigger: "blur"}
                    ],
                    // 挂牌车车辆信息校验
                    mileage: [
                        {required: true, message: "表显里程不能为空", trigger: "blur"},
                        {validator: mileageValiate, trigger: "blur"}
                    ],
                    vehicleMadeDate: [
                        {required: true, message: "车辆出厂日期不能为空", trigger: "change", type: 'date'}
                    ],
                    carBelongs: [
                        {required: true, message: "所有人不能为空", trigger: "blur"}
                    ],
                    belongsCertNo: [
                        {required: true, message: "所有人证件号不能为空", trigger: "blur"}

                    ],

                    // 二手车资产信息校验
                    carBodyClass: [
                        {required: true, message: "车身级别不能为空", trigger: "blur"}
                    ],
                    carColor: [
                        {required: true, message: "车辆颜色不能为空", trigger: "blur"}
                    ],
                    fuelType: [
                        {required: true, message: "燃油种类不能为空", trigger: "blur"}
                    ],
                    carDisplacement: [
                        {required: true, message: "排量不能为空", trigger: "blur"}
                    ],
                    carTransmission: [
                        {required: true, message: "变速器不能为空", trigger: "blur"}
                    ],
                    totalPassenger: [
                        {required: true, message: "核定载客不能为空", trigger: "blur", type: "number"}
                    ],
                    fullModelNum: [
                        {required: true, message: "车辆型号不能为空", trigger: "blur"},
                        {validator: utils.isCharNumValitate, trigger: "blur"}
                    ],
                    secondSalePrice: [
                        {required: true, message: "二手车销售价格不能为空", trigger: "blur"},
                        {validator: isUsedCarSalePriceValiate, trigger: "blur"}
                    ],
                    evaluatingPrice: [
                        {required: true, message: "评估价格不能为空", trigger: "blur"},
                        {validator: isEvaluatePriceValiate, trigger: "blur"}
                    ],
                    licensePlate: [
                        {required: true, message: "车牌号不能为空", trigger: "blur"},
                        {validator: plateNoValiate, trigger: "blur"}
                    ],
                    // 二手车车辆手续信息
                    dealerName: [
                        {required: true, message: "车商姓名不能为空", trigger: "blur"}
                    ],
                    dealerPhone: [
                        {required: true, message: "车商联系电话不能为空", trigger: "blur"},
                        {validator: utils.isMorePhoneValiate, trigger: "blur"}
                    ],
                    dealerLocation: [
                        {required: true, message: "车商联系地址不能为空", trigger: "blur", type: "array"}
                    ],
                    yearTransNum: [
                        {required: true, message: "一年内过户次数不能为空", trigger: "blur", type: "number"},
                    ],
                    isCirTrans: [
                        {required: true, message: "循环过户不能为空", trigger: "change"}
                    ],
                    isMortgage: [
                        {required: true, message: "抵押不能为空", trigger: "change"}
                    ],
                    registLocation: [
                        {required: true, message: "注册地址不能为空", trigger: "blur", type: "array"}
                    ],
                },
                affiliatedFormValidate: {
                    // 挂靠信息
                    socUniCrtCode: [
                        {required: true, message: "统一信用社会代号不能为空", trigger: "blur"}
                    ],
                    legalName: [
                        {required: true, message: "法人姓名不能为空", trigger: "blur"}
                    ],
                    legalPhone: [
                        {required: true, message: "联系电话不能为空", trigger: "blur"}
                    ],
                    platformId: [
                        {required: true, message: "网约车平台不能为空", trigger: "change"}
                    ],
                    cooperPlatform: [
                        {required: true, message: "网约车平台不能为空", trigger: "change"}
                    ],
                    affiliatedName: [
                        {required: true, message: "个体工商户名称不能为空", trigger: "blur"}
                    ],
                    affiliatedId: [
                        {required: true, message: "公司名称/运营公司不能为空", trigger: "blur"}
                    ],
                    registLocation: [
                        {required: true, message: "注册地址不能为空", trigger: "change", type: "array"}
                    ],
                    registAddress: [
                        {required: true, message: "详细地址不能为空", trigger: "blur"}
                    ]
                },
            }
        },
        components: {
            CharCascade,
            FinancialProd,
            NewCar,
            OldCar,
            PlateCar,
            AffiliatedWay,
            SingleUpload
        },
        created() {
            this.uuid = this.getUuid();
            this.setCurrentUserBusinessType()
        },
        mounted() {
            this.curTab = 2;
            this.getComonLocation()
            // 获取别处传递过来的申请申请编号
            console.log(this.afs.getPageParams(this), "资产变更是否取到applyno")
            if (this.afs.getPageParams(this)) {
                if (Object.keys(this.afs.getPageParams(this)).length > 0) {
                    this.applyNo = this.afs.getPageParams(this).applyNo;
                    this.diffType = this.afs.getPageParams(this).diffType;
                    this.assertId=this.afs.getPageParams(this).assertId;
                    if (this.applyNo) {
                        this.initDatadic();
                        // 调用订单信息,资产信息接口
                        this.finalQueryInfo();
                        this.$refs.singleUpload.resetimgurl();
                        this.$refs.singleUpload.showCarImg(this.assertId);
                    }
                }
            }
        },
        methods: {
            queryFormEl() {
                return this.$refs.proessForm;
            },
            turnValiteFlag(val){
                this.valiateFlag=val;
            },
            changeSalePrice(val,isAutoCount){
                this.salePrice=val;
                this.isAutoCount=isAutoCount;
            },
            getUuid() {
                let seed = 0;
                const now = Date.now();
                return 'ui-tab-' + now + '-' + (seed++);
            },
            getComonLocation() {
                let param = ""
                param = {
                    level: '1',
                    upperCode: '1'
                };
                getLocation(param).then((res) => {
                    if (res.code == "0000") {
                        res.data.forEach(item => {
                            // 表明是否是父节点
                            if (item.isParent) {
                                item.loading = false;
                                item.children = [];
                            }
                        })
                    }
                    this.location.push(...res.data);
                })
            },
            initDatadic() {
                let arr = ['carType', 'carNature', "operateWay", "affiliatedWay", "carPurpose"];
                contractUtils.getDictDataList(arr).then(res => {
                    this.carTypeList = res.carTypeDict;
                    this.carAttrList = res.carNatureDict;
                    this.operWayList = res.operateWayDict;
                    this.affiModeList = res.affiliatedWayDict;
                    this.buyPurposeList = res.carPurposeDict;
                })
            },
            // 选中款式的查询后获取的车辆信息
            carinfo(obj) {
                this.optionForm.brandName = obj.curBrandName;
                this.optionForm.modelName = obj.curModelName;
                this.optionForm.styleName = obj.curStyleName;
                this.optionForm.guidePrice = obj.curGuidePrice;
                this.optionForm.salePrice = obj.curGuidePrice;
                let self=this;
                this.$nextTick(function(){
                    self.$refs.newCar.inputSalePrice(obj.curGuidePrice,false);
                    self.$refs.financialProd.resetAll()
                })
                this.brandId = obj.curBrandId;
                this.modelId = obj.curModelId;
                this.styleId = obj.curStyleId;
            },
            // 查询订单信息
            queryOrderInfo() {
                let param = ""
                param = {
                    applyNo: this.applyNo,
                }
                return new Promise((resolve, reject) => {
                    getOrderInfo(param).then(res => {
                        console.log("是否进入订单接口调用")
                        if (res.code == "0000") {
                            if (res.data) {
                                this.businessTypeForm.businessType = res.data.businessType || '';
                                this.businessTypeForm.carType = res.data.carType || '';
                                this.businessTypeForm.carNature = res.data.carNature || '';
                                this.extraValiate(res.data.businessType, res.data.carNature)
                                this.businessTypeForm.operateWay = res.data.operateWay || '';
                                this.businessTypeForm.affiliatedWay = res.data.affiliatedWay || '';
                                this.businessTypeForm.carPurpose = res.data.carPurpose || '';
                                this.businessTypeForm.dealerId = res.data.dealerId || '';
                                this.tempAffiMode = res.data.affiliatedWay || '';
                                this.orderId = res.data.id;
                                resolve(res.data)
                            }
                        } else {
                            reject(res.message)
                        }

                    })
                })
            },
            // 获取资产信息
            queryCarInfo(data) {
                this.businessType = data.businessType;
                this.carAttr = data.carNature;
                let param = "";
                param = {
                    carNature: data.carNature,
                    businessType: data.businessType,
                    applyNo: this.applyNo,
                    businessFlag:"assetChange"
                }
                getCarInfo(param).then(res => {
                    if (res.code == "0000") {
                        // 新车
                        if (this.businessType == '01' && this.carAttr == '01') {
                            // 新车直接给form表单赋值
                            if (res.data.newCarInfo) {
                                this.capitalId = res.data.newCarInfo.id;
                                // this.optionForm=res.data.newCarInfo;
                                this.optionForm = Object.assign({}, this.optionForm, res.data.newCarInfo);

                                this.brandId = res.data.newCarInfo.brandId;
                                this.modelId = res.data.newCarInfo.modelId;
                                this.styleId = res.data.newCarInfo.styleId;

                                if (res.data.newCarInfo.guidePrice) {
                                    this.optionForm.guidePrice = res.data.newCarInfo.guidePrice.toString();
                                }
                                if (res.data.newCarInfo.salePrice) {
                                    this.optionForm.salePrice = res.data.newCarInfo.salePrice.toString();
                                }
                                // 购买地址
                                let purchaseAdderss = [];
                                purchaseAdderss[0] = res.data.newCarInfo.purchaseProvince || '';
                                purchaseAdderss[1] = res.data.newCarInfo.purchaseCity || '';
                                this.$set(this.optionForm, "purchaseLocation", purchaseAdderss)
                                //上牌地址
                                let licenseAdress = [];
                                licenseAdress[0] = res.data.newCarInfo.licenseProvince || '';
                                licenseAdress[1] = res.data.newCarInfo.licenseCity || '';
                                this.$set(this.optionForm, "licenseLocation", licenseAdress)
                            }
                        }
                        // 挂牌新车
                        else if (this.businessType == '01' && this.carAttr == '02') {
                            //挂牌新车直接给form表单赋值
                            if (res.data.licenseCarInfo) {
                                // this.optionForm=res.data.licenseCarInfo;
                                this.optionForm = Object.assign({}, this.optionForm, res.data.licenseCarInfo);
                                this.capitalId = res.data.licenseCarInfo.id;
                                if (res.data.licenseCarInfo.guidePrice) {
                                    this.optionForm.guidePrice = res.data.licenseCarInfo.guidePrice.toString();
                                }
                                if (res.data.licenseCarInfo.salePrice) {
                                    this.optionForm.salePrice = res.data.licenseCarInfo.salePrice.toString();
                                }
                                if (res.data.licenseCarInfo.mileage) {
                                    this.optionForm.mileage = res.data.licenseCarInfo.mileage.toString();
                                }

                                // 购买地址
                                let purchaseAdderss = [];
                                purchaseAdderss[0] = res.data.licenseCarInfo.purchaseProvince || '';
                                purchaseAdderss[1] = res.data.licenseCarInfo.purchaseCity || '';
                                this.$set(this.optionForm, "purchaseLocation", purchaseAdderss)
                                //上牌地址
                                let licenseAdress = [];
                                licenseAdress[0] = res.data.licenseCarInfo.licenseProvince || '';
                                licenseAdress[1] = res.data.licenseCarInfo.licenseCity || '';
                                this.$set(this.optionForm, "licenseLocation", licenseAdress)

                                //首次上牌地点
                                let firstlicenseAdress = [];
                                firstlicenseAdress[0] = res.data.licenseCarInfo.firstLicenseProvince || '';
                                firstlicenseAdress[1] = res.data.licenseCarInfo.firstLicenseCity|| '';
                                this.$set(this.optionForm, "firstLicenseAddress",firstlicenseAdress);


                            }
                        }
                        // 二手车
                        else if (this.businessType == '02') {
                            //二手车直接给form表单赋值
                            if (res.data.oldCarInfo) {
                                this.capitalId = res.data.oldCarInfo.id;
                                // this.optionForm=res.data.oldCarInfo;
                                this.optionForm = Object.assign({}, this.optionForm, res.data.oldCarInfo);

                                if (res.data.oldCarInfo.guidePrice) {
                                    this.optionForm.guidePrice = res.data.oldCarInfo.guidePrice.toString();
                                }
                                this.optionForm.secondSalePrice = res.data.oldCarInfo.secondSalePrice.toString();
                                this.optionForm.evaluatingPrice = res.data.oldCarInfo.evaluatingPrice.toString();
                                this.optionForm.mileage = res.data.oldCarInfo.mileage.toString();
                                // 购买地址
                                let purchaseAdderss = [];
                                purchaseAdderss[0] = res.data.oldCarInfo.purchaseProvince || '';
                                purchaseAdderss[1] = res.data.oldCarInfo.purchaseCity || '';
                                this.$set(this.optionForm, "purchaseLocation", purchaseAdderss)

                                //上牌地址
                                let licenseAdress = [];
                                licenseAdress[0] = res.data.oldCarInfo.licenseProvince || '';
                                licenseAdress[1] = res.data.oldCarInfo.licenseCity || '';
                                this.$set(this.optionForm, "licenseLocation", licenseAdress)
                                // 注册地址
                                let registAddress = [];
                                registAddress[0] = res.data.oldCarInfo.registProvince || '';
                                registAddress[1] = res.data.oldCarInfo.registCity || '';
                                this.$set(this.optionForm, "registLocation", registAddress)
                                // 车商地址
                                let dealerAddress = [];
                                dealerAddress[0] = res.data.oldCarInfo.dealerProvince || '';
                                dealerAddress[1] = res.data.oldCarInfo.dealerCity || '';
                                this.$set(this.optionForm, "dealerLocation", dealerAddress)

                            }
                        }
                    }
                })
            },
            // 获取挂靠信息
            queryAffiliatedWayInfo(data) {
                let param = "";
                param = {
                    applyNo: this.applyNo,
                    affiliatedWay: data.affiliatedWay
                }
                getAffiliatedInfo(param).then(res => {
                    if (res.code == "0000") {
                        // 公司名称挂靠
                        if (data.affiliatedWay == "01") {
                            if (res.data.companyInfo) {
                                this.tempAffiInfo = res.data.companyInfo;
                                this.tempaffiliatedId = res.data.companyInfo.id;
                                // this.affiliatedForm.affiliatedId=res.data.companyInfo.affiliatedId||'';
                                this.affiliatedForm.socUniCrtCode = res.data.companyInfo.socUniCrtCode || '';
                                this.affiliatedForm.legalName = res.data.companyInfo.legalName || '';
                                this.affiliatedForm.legalPhone = res.data.companyInfo.legalPhone || '';
                                this.affiliatedForm.licenceEndDate = res.data.companyInfo.licenceEndDate || '';
                                let tempArr = [];
                                tempArr[0] = res.data.companyInfo.registProvince || '';
                                tempArr[1] = res.data.companyInfo.registCity || '';
                                this.$set(this.affiliatedForm, "registLocation", tempArr)
                                this.affiliatedForm.registAddress = res.data.companyInfo.registAddress;
                            }
                        }
                        // 个体工商户
                        else if (data.affiliatedWay == "02") {
                            if (res.data.personalInfo) {
                                this.tempaffiliatedId = res.data.personalInfo.id;
                                this.affiliatedForm.affiliatedName = res.data.personalInfo.affiliatedName || '';
                                this.tempAffiInfo = res.data.personalInfo;
                            }
                        }
                        // 网约车
                        else if (data.affiliatedWay == "03") {
                            if (res.data.networkInfo) {
                                this.tempaffiliatedId = res.data.networkInfo.id;
                                // this.affiliatedForm.affiliatedId=res.data.networkInfo.affiliatedId||'';
                                this.affiliatedForm.affiliatedName = res.data.networkInfo.affiliatedName || '';
                                this.affiliatedForm.platformId = res.data.networkInfo.platformId || '';
                                this.affiliatedForm.cooperPlatform = res.data.networkInfo.cooperPlatform || '';
                                this.tempAffiInfo = res.data.networkInfo;
                            }
                        }
                    }
                })
            },
            // 调取资产信息接口
            finalQueryInfo() {
                this.queryOrderInfo().then((data) => {
                    this.queryCarInfo(data);
                    this.queryAffiliatedWayInfo(data);
                })
            },
            // 车型库弹窗出现
            queryVehicleData() {
                this.isShowModel = true;
                this.$emit("open-model");
            },
            closeModel(value) {
                this.isShowModel = value;
            },
            // 点击保存挂靠信息id
            saveAffiliatedId(id) {
                this.tempaffiliatedId = id;
            },
            saveCapitalInfo(type) {
                // 三种车共同入参
                let param = {
                    applyNo: this.applyNo,
                    brandName: this.optionForm.brandName,
                    modelName: this.optionForm.modelName,
                    styleName: this.optionForm.styleName,
                    guidePrice: this.optionForm.guidePrice,
                    id: this.capitalId,
                    purchaseProvince: this.optionForm.purchaseLocation[0],
                    purchaseCity: this.optionForm.purchaseLocation[1],
                    licenseProvince: this.optionForm.licenseLocation[0],
                    licenseCity: this.optionForm.licenseLocation[1],
                };
                // 新车与二手车公共字段
                if (type == "newCar" || type == "plateCar") {
                    param.salePrice = this.optionForm.salePrice
                    param.carNature = this.carAttr;
                }
                // 二手车与挂牌车公共字段
                if (type == "plateCar" || type == "oldCar") {
                    param.carVin = this.optionForm.carVin;
                    param.engineNo = this.optionForm.engineNo;
                    param.carFunction = this.optionForm.carFunction;
                    param.mileage = this.optionForm.mileage;
                    param.carBelongs = this.optionForm.carBelongs;
                    param.belongsCertNo = this.optionForm.belongsCertNo;
                    param.transNums = this.optionForm.transNums;
                }
                // 新车新增入参字段
                if (type == "newCar") {
                    param.brandId = this.brandId;
                    param.modelId = this.modelId;
                    param.styleId = this.styleId;
                }
                // 挂牌车单独字段
                if (type == "plateCar") {
                    param.vehicleMadeDate = this.optionForm.vehicleMadeDate;
                    param.firstLandingDate = this.optionForm.firstLandingDate;
                    param.licensePlate = this.optionForm.licensePlate;
                    // param.firstLicenseAddress = this.optionForm.firstLicenseAddress;
                    param.firstLicenseProvince=this.optionForm.firstLicenseAddress[0];
                    param.firstLicenseCity=this.optionForm.firstLicenseAddress[1];
                }
                // 二手车单独字段
                if (type == "oldCar") {
                    // 资产信息字段
                    param.carBodyClass = this.optionForm.carBodyClass;
                    param.carColor = this.optionForm.carColor;
                    param.fuelType = this.optionForm.fuelType;
                    param.carDisplacement = this.optionForm.carDisplacement;
                    param.carTransmission = this.optionForm.carTransmission;
                    param.totalPassenger = this.optionForm.totalPassenger;
                    param.fullModelNum = this.optionForm.fullModelNum;
                    param.secondSalePrice = this.optionForm.secondSalePrice;
                    param.evaluatingPrice = this.optionForm.evaluatingPrice;
                    param.belongsAddress = this.optionForm.belongsAddress

                    //车辆手续信息字段
                    param.licensePlate = this.optionForm.licensePlate;
                    param.carAppraiser = this.optionForm.carAppraiser;
                    param.dealerName = this.optionForm.dealerName;
                    param.dealerPhone = this.optionForm.dealerPhone;
                    param.dealerProvince = this.optionForm.dealerLocation[0];
                    param.dealerCity = this.optionForm.dealerLocation[1];
                    param.firstLandingDate = this.optionForm.firstLandingDate;
                    param.yearTransNum = this.optionForm.yearTransNum;
                    param.isCirTrans = this.optionForm.isCirTrans;
                    param.isMortgage = this.optionForm.isMortgage;
                    param.registProvince = this.optionForm.registLocation[0];
                    param.registCity = this.optionForm.registLocation[1];
                }
                if (this.capitalId) {
                    updateCarInfo(param).then(res => {
                        if (res.code == "0000") {
                            this.$Message.success("更新资产信息成功");
                        }
                    })
                }
            },
            backAssert() {
                this.afs.closeTab(this);
            },
            calculate() {
                this.$refs.financialProd.calculate();
            },
            calculateIntrate() {
                this.$refs.financialProd.calculateIntrate();
            },
            financialSave() {
                this.$refs.financialProd.financialSave();
            },
            tagTitle(value) {
                this.curSchedule = value;
            },
            cancelModel() {
                this.proessModel = false;
            },
            isShowProessModel(val) {
                this.proessModel = val;
            },
            scheduleTitle(val) {
                this.scheduleTitleList = val;
            },
            showCalculate(falseVal, trueVal) {
                this.isreadonly = falseVal;
                this.isShowCalculate = trueVal;
            },
            getInputValue(value, index, isreadonly) {
                if (!isreadonly) {
                    if (utils.isTwoDicmal(value)) {
                        this.proessForm.proessList[index].proessValue = [0, ""]
                        this.proessForm.proessList[index].proessValue.splice(1, 1, value);
                    }
                }
            },
            caluMaxValue(maxValue) {
                this.maxValue = maxValue;
            },
            passValiate() {
                this.initProessValiate();
            },
            // 校验附加贷
            initProessValiate() {
                console.log(this.proessForm.proessList[0], "this.proessForm.proessList")
                for (let i = 0; i < this.proessForm.proessList.length; i++) {
                    this.proessFormValidate["proessList[" + i + "].inputValue"] = [
                        {validator: utils.isTwoDicmalValiate, trigger: "blur"}
                    ];
                }
            },
            queryRecordAddress(location) {
                console.log(location, "location")
                this.$set(this.optionForm, 'licenseLocation', location);
                this.isNetLocation = true;
            },
            /**
             * 资产变更请求发起至信审
             */
            submitAssert() {
                let params = {
                    applyNo: this.applyNo,
                }
                let data = this.queryImgParam(params);
                if (!data) {
                    this.$Message.warning("请上传变更证明");
                    return;
                }
                //新车 :支持修改资产信息（除上牌地点和购买地点）；支持修改金融产品，不可提高贷款金额、不可降低首付，可缩短贷期，可以修改资产信息和附加贷信息；
                if (this.businessTypeForm.businessType == '01') {
                    // if(){
                    //
                    // }
                }
                console.log(params, "params-submitAssert")
                sendAssertChangeCaseSubmit(params).then(res => {
                    if (res.code === '0000') {
                        this.$Message.success("资产变更提交信审成功")
                        this.afs.closeTab(this);
                    }
                });
            },
            //获取图片入参数
            queryImgParam(params) {
                // 影像入参数
                let imgList = this.$refs.singleUpload.singleimglist();
                if (imgList.length < 1) {
                    return false;
                }
                if (imgList.length > 0) {
                    let tempArr = [];
                    imgList.forEach((item, index) => {
                        item.map.type = this.imgtype
                        tempArr.push(item.map);
                    })
                    params.contractFileVos = tempArr;
                }
                return true;
            },
            // 通过角色设置新车、二手车权限
            setCurrentUserBusinessType(name) {
                getUserInfo().then((res) => {
                    if (res.code === "0000" && res.data.sysUser) {
                        this.username = res.data.sysUser.username;
                        if (this.applyNo) {
                            this.queryOrderInfo().then(data => {
                                console.log(data.businessType, "businessType-assertChange")
                                this.queryAdderssList(data.businessType)
                            })
                        }
                    }
                })
            },
            queryAdderssList(busiType) {
                let param = {
                    upperCode: "1",
                    username: this.username,
                }
                if (busiType == "01") {
                    param.businessType = "newCar"
                } else if (busiType == "02") {
                    param.businessType = "oldCar"
                }
                noDealerGetAddressList(param).then(res => {
                    if (res.code == "0000") {
                        res.data.forEach(item => {
                            // 表明是否是父节点
                            if (item.isParent) {
                                item.loading = false;
                                item.children = [];
                            }
                        })
                    }
                    this.dynamicLocation = res.data;
                })
            },
            loadAddress(item, callback) {
                item.loading = true;
                let param = {
                    username: this.username,
                    upperCode: item.value,
                }
                if (this.businessType == '01') {
                    param.businessType = 'newCar'
                } else if (this.businessType == '02') {
                    param.businessType = 'oldCar'
                }
                noDealerGetAddressList(param).then(res => {
                    if (res.code === "0000") {
                        res.data.forEach(function (item) {
                            if (item.isParent) {
                                item.loading = false;
                                item.children = [];
                            }
                        });
                        item.children = res.data;
                        item.loading = false;
                        callback();
                    }
                })
            },
            // 重置挂牌车vin查询出来的字段
            resetPlateVinInfo() {
                this.plateData = {};
                let fieldArr = ['brandName', "modelName", "styleName", "guidePrice", "engineNo", 'mileage', "vehicleMadeDate", "licensePlate", "carBelongs", 'belongsCertNo', 'firstLandingDate', 'carFunction'];
                let self = this;
                this.$refs["optionForm"].fields.forEach(function (e) {
                    if (fieldArr.indexOf(e.prop) != '-1') {
                        if (self.optionForm[e.prop]) {
                            e.resetField()
                        }
                    }
                })
            },
            extraValiate(businessType, carAttr) {
                if (businessType == '02') {
                    this.optionFormValidate.firstLandingDate = [{
                        required: true,
                        message: '首次登记日期不能为空',
                        trigger: 'change',
                        type: 'date'
                    }]
                    this.optionFormValidate.transNums = [
                        {required: true, message: '总过户次数不能为空', trigger: 'blur', type: "number"},
                        {validator: this.transNumsValiate, trigger: 'blur'}
                    ]
                    // 新车挂牌新车
                } else if (carAttr == '02') {
                    this.optionFormValidate.firstLandingDate = []
                    this.optionFormValidate.transNums = []
                }

            },
            saveBtn(type){
                if(this.saveStatus.disabled){
                    this.$Message.warning("请先点击计算");
                    return;
                }
                let carinfoParam=this.getCarinfoParm();
                if(!carinfoParam){
                    return false;
                }
                let param=this.$refs.financialProd.querySaveData();
                if(!param){
                    return false;
                }
                param.carInfo=carinfoParam;
                // console.log(param,"param")
                updateBodyContent(param).then(res=>{
                    if(res.code=="0000"){
                        if(type=='submit'){
                            this.submitAssert();
                        }else{
                            this.$Message.success("保存成功")
                        }
                    }
                })
                
            },
            getCarinfoParm(){
                let optionVailate=false;
                 // 三种车共同入参
                 let param = {
                    brandName: this.optionForm.brandName,
                    modelName: this.optionForm.modelName,
                    styleName: this.optionForm.styleName,
                    guidePrice: this.optionForm.guidePrice,
                    id: this.capitalId,
                    purchaseProvince: this.optionForm.purchaseLocation[0],
                    purchaseCity: this.optionForm.purchaseLocation[1],
                    licenseProvince: this.optionForm.licenseLocation[0],
                    licenseCity: this.optionForm.licenseLocation[1],
                    carNature:this.carAttr
                };
                 // 新车与挂牌车公共字段
                 if (this.businessType == '01') {
                    param.salePrice = this.optionForm.salePrice;
                }
                // 二手车与挂牌车公共字段
                if ((this.businessType == '01' && this.carAttr == '02') || this.businessType == "02") {
                    param.carVin = this.optionForm.carVin;
                    param.engineNo = this.optionForm.engineNo;
                    param.carFunction = this.optionForm.carFunction;
                    param.mileage = this.optionForm.mileage;
                    param.carBelongs = this.optionForm.carBelongs;
                    param.belongsCertNo = this.optionForm.belongsCertNo;
                    param.transNums = this.optionForm.transNums;
                }
                // 新车新增入参字段
                if (this.businessType == '01' && this.carAttr != '02') {
                    param.brandId = this.brandId;
                    param.modelId = this.modelId;
                    param.styleId = this.styleId;
                }
                // 挂牌车单独字段
                if (this.businessType == '01' && this.carAttr == '02') {
                    param.vehicleMadeDate = this.optionForm.vehicleMadeDate;
                    param.firstLandingDate = this.optionForm.firstLandingDate;
                    param.licensePlate = this.optionForm.licensePlate;
                    // param.firstLicenseAddress = this.optionForm.firstLicenseAddress;
                    param.firstLicenseProvince=this.optionForm.firstLicenseAddress[0];
                    param.firstLicenseCity=this.optionForm.firstLicenseAddress[1];
                }
                // 二手车单独字段
                if (this.businessType == "02") {
                    // 资产信息字段
                    param.carBodyClass = this.optionForm.carBodyClass;
                    param.carColor = this.optionForm.carColor;
                    param.fuelType = this.optionForm.fuelType;
                    param.carDisplacement = this.optionForm.carDisplacement;
                    param.carTransmission = this.optionForm.carTransmission;
                    param.totalPassenger = this.optionForm.totalPassenger;
                    param.fullModelNum = this.optionForm.fullModelNum;
                    param.secondSalePrice = this.optionForm.secondSalePrice;
                    param.evaluatingPrice = this.optionForm.evaluatingPrice;
                    param.belongsAddress = this.optionForm.belongsAddress

                    //车辆手续信息字段
                    param.licensePlate = this.optionForm.licensePlate;
                    param.carAppraiser = this.optionForm.carAppraiser;
                    param.dealerName = this.optionForm.dealerName;
                    param.dealerPhone = this.optionForm.dealerPhone;
                    param.dealerProvince = this.optionForm.dealerLocation[0];
                    param.dealerCity = this.optionForm.dealerLocation[1];
                    param.firstLandingDate = this.optionForm.firstLandingDate;
                    param.yearTransNum = this.optionForm.yearTransNum;
                    param.isCirTrans = this.optionForm.isCirTrans;
                    param.isMortgage = this.optionForm.isMortgage;
                    param.registProvince = this.optionForm.registLocation[0];
                    param.registCity = this.optionForm.registLocation[1];
                }
                this.$refs.optionForm.validate((valid) => {
                    if(valid){
                        optionVailate=valid;
                    }else{
                        optionVailate=false;
                    }
                })
                if(optionVailate){
                    return param;
                }else{
                    return false;
                }
            },
        }
    }
</script>
<style scoped>
     .sliderList >>> .ivu-form-item-error-tip {
        top: 80%;
    }

    .sliderList {
        padding-top: 30px;
        max-height: 450px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .scheduleTitle {
        padding-left: 30px;
        line-height: 20px;
        font-size: 14px;
    }

    .scheduleTitle span.curScheStyle {
        color: #efab4d;
    }

    .business_option {
        padding-top: 40px;
    }

    .business_content {
        background-color: #FCFCFC;
    }

    .submit {
        margin: 25px 0;
        text-align: center;
    }

    .uploadecn {
        padding-left: 100px;
        margin-left: 48px;
    }

    .uploadecn > span {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 0px;
        color: #333;
    }
    .operBtn{
        padding: 0 20px 10px;
        text-align: right;
    }
    .operBtn span.saveBtn,
    .operBtn span.backBtn,
    .operBtn span.submitBtn{
        color: #EB9620;
        font-weight: normal;
        display: inline-block;
        width: 40px;
        text-align: center;
        cursor: pointer;
        font-size: 14px;
    }
</style>

